package com.simpleframe.flow;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class Node {

	protected String name;
	
	protected List<Transition> transitionList;
	
	public void forword(){
		for (Transition transition : transitionList) {
			transition.move();
		}
		end();//结束自己
	}
	
	public void end(){
		System.out.println(name+" 结束");
	}
	
	public void start(){
		System.out.println(name+" 开始");
		//启动任务
	}
	
	public void addTransition(Transition transition){
		if(transitionList == null){
			transitionList = new ArrayList<Transition>();
		}
	}
}
